'''
''' Authorize sub is called during the load phase.
'''
Public Overrides Sub Authorize(ByVal roles As String)
' NOTE: if role-based security was configured through Iron Speed Designer,
' and the page was configured to allow specific roles, those roles will be
' passed to this function in the roles parameter as a
' semi-colon-delimited list of values: Role1;Role2;etc.
If ("Your business logic here") Then
Me.RedirectToForbiddenPage()
Else
MyBase.Authorize(roles)
End If
' Note: If your custom enforcement code must interact with the page's controls (e.g. RecordControls) after
' they have had their data loaded from the database, then you can add an event handler for one of
' the page's events (e.g. DataBinding, Load, or PreRender) which can conditionally redirect to the
' Forbidden page, Sign In page, etc.
End Sub
|